var role = require("../server/lib/role");
var notify = require("../server/lib/notify");
var UserCon = iClass.get("User");
var TalkCon = iClass.get("Talk");
var FriendCon = iClass.get("Friend");
midEvent.on("new_talk", function(talk_id) {
	var talk = TalkCon.get(talk_id);
	var friend = FriendCon.get(talk.friend_id);
	console.log("new_talk:", talk_id, talk.friend_id, friend.friend_id, role.getUserSockSet(friend.friend_id));
	notify.send(role.getUserSockSet(friend.friend_id), "new_talk", {
		talk: talk,
		friend: friend
	});
});